package com.sumainfor.pc.market.controller.epc;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.market.dao.SearchProviderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author EddyChen
 * @Email 835033913@qq.com
 * @Create 2019/6/25 19:35
 * 搜索的提供者
 */
@RestController
@RequestMapping("/key/provider/search")
public class SearchProviderController {

    @Autowired
    private SearchProviderMapper mapper;


    /**
     * 通过小区名称搜素小区编号集合
     *
     * @param comName
     * @return
     */
    @PostMapping("/selectProjectIdList")
    public JsonResult selectProjectIdList(String comName) {
        return JsonResult.success(mapper.selectComIdForSearchName(comName));
    }


    @PostMapping("/getHouEpc")
    public Map<String,Object> getHouEpc(@RequestBody Map<String,Object> params){
        return mapper.getHouEpc(params);
    }

}
